Skip to content

feat: 支持灵动岛宽度设置#171

Open
Makia9879 wants to merge 1 commit into
wxtsky:mainfrom
Makia9879:bugfix/island-width
Open

feat: 支持灵动岛宽度设置#171
Makia9879 wants to merge 1 commit into
wxtsky:mainfrom
Makia9879:bugfix/island-width

Conversation

@Makia9879
Copy link
Copy Markdown

@Makia9879 Makia9879 commented May 12, 2026

变更说明

新增真实刘海屏上的 Dynamic Island 宽度调整支持。

背景

原实现中 collapsedWidthScale 主要用于非刘海屏:

guard !hasNotch else { return notchW }

因此:

  • 非刘海屏会按用户设置调整模拟灵动岛宽度
  • 真实刘海屏会保持系统检测到的原始 notch 宽度

本次变更在保留原有非刘海屏行为的基础上,将“Island Width / 灵动岛宽度”扩展为通用设置,使真实刘海屏上的收起态宽度也可以
跟随用户配置变化。

同时,紧凑态和空闲态中部分占位原本使用原始 notchW。为支持真实刘海屏宽度调整,这些内部占位也同步改为使用缩放后的有效宽
度。

新增能力

  • 真实刘海屏支持通过 collapsedWidthScale 调整 Dynamic Island 收起态宽度
  • 非刘海屏继续保留原有模拟灵动岛宽度调整能力
  • 紧凑态、空闲态和内部占位统一使用缩放后的有效宽度
  • 中文设置说明更新为通用描述
  • 增加宽度缩放和边界 clamp 的单元测试

验证

  • swift test --filter NotchPanelViewTests
  • ./build.sh
  • lipo -archs .build/dist/CodeIsland.app/Contents/MacOS/CodeIsland

验证结果:

NotchPanelViewTests: 17 tests, 0 failures
CodeIsland.app: x86_64 arm64
codeisland-bridge: x86_64 arm64

@Makia9879 Makia9879 changed the title fix: 修复灵动岛宽度设置失效的问题 feat: 支持灵动岛宽度设置 May 12, 2026
@Makia9879 Makia9879 force-pushed the bugfix/island-width branch from 5d7124c to eb0cc90 Compare May 12, 2026 04:45
@Apricity7117
Copy link
Copy Markdown

确实,mbam4上调整这个宽度愣是没变化,我还以为是我理解错了

nguyenvanduocit added a commit to nguyenvanduocit/CodeIsland that referenced this pull request May 13, 2026
…021 extended to real notch

- Add T-056: panel jumping between physical monitors in dual-screen setup (issue wxtsky#176, no upstream fix yet)
- Update T-021 criteria to incorporate PR wxtsky#171 real-notch width scaling when it merges
- Note PR wxtsky#171 (open) watching status, issue wxtsky#170 as T-053 symptom, skip Codex/OpenCode commits

https://claude.ai/code/session_01Gpa3DQ7HD9BXYsayCfbb8F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants